Skip to content

Fix regressions in env baking#2746

Merged
riccardobl merged 7 commits into
jMonkeyEngine:masterfrom
riccardobl:fixregression3
May 8, 2026
Merged

Fix regressions in env baking#2746
riccardobl merged 7 commits into
jMonkeyEngine:masterfrom
riccardobl:fixregression3

Conversation

@riccardobl
Copy link
Copy Markdown
Member

@riccardobl riccardobl commented May 8, 2026

  • Add packed float toggler to getBestColorTargetFormat
  • Disallow packed floats in env backer.
  • Do not return packed float if alpha is requested
  • Harden IBL Math

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new supportPackedFloat parameter to the getBestColorTargetFormat method in the Renderer interface, allowing for more granular control over color format selection. Existing calls in EnvironmentCamera and GenericEnvBaker have been updated to explicitly disable packed float support. The review feedback suggests adding Javadoc to the new public API methods for better documentation and highlights a logic error where the withAlpha requirement was ignored when selecting the RGB111110F format.

Comment thread jme3-core/src/main/java/com/jme3/renderer/Renderer.java
Comment thread jme3-core/src/main/java/com/jme3/renderer/Renderer.java Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@riccardobl
Copy link
Copy Markdown
Member Author

Please review @gemini-code-assist

@riccardobl riccardobl changed the title add packed float toggler to getBestColorTargetFormat and disallow packed floats in env backer Improve getBestColorTargetFormat selection May 8, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Renderer interface by adding a supportPackedFloat parameter to the getBestColorTargetFormat method and refining the logic to better respect alpha requirements and precision levels. Feedback identifies a bug in IBLGLEnvBakerLight where setting withAlpha to false breaks calculations that depend on the alpha channel. Additionally, the reviewer pointed out that HDR remapping and warnings should only be applied when the system falls back to RGBA8, as 16-bit float formats provide sufficient precision.

Comment thread jme3-core/src/main/java/com/jme3/environment/baker/IBLGLEnvBakerLight.java Outdated
@riccardobl riccardobl changed the title Improve getBestColorTargetFormat selection Fix regressions in env baking May 8, 2026
@riccardobl riccardobl merged commit ebe10ba into jMonkeyEngine:master May 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant